{template 'admin','header'}
<form action="" name='form1' method="POST">
<table class="table_list">
<caption>{$ginfo['g_name']}用户管理列表</caption>
<tr>
{if isset($view_list[$gid]) && check_perms('G006',$view_list[$gid])===true}
	<th width="80"><input type="checkbox" onclick="checkall(this,'ck')" name="ckall">全选/取消</th>
{/if}
	<th width="80">管理员ID</th>
	<th>管理员用户名/姓名</th>
	<th width="150">操作</th>
</tr>
{loop $list $user}
<tr>
{if isset($view_list[$gid]) && check_perms('G006',$view_list[$gid])===true}
<td><input type="checkbox" name="ck[]" value="{$user['u_id']}"></td>
{/if}
<td>{$user['u_id']}</td>
<td>{$user['username']}/{if (!empty($user['truename']))} {$user['truename']} {else} 未填写{/if}</td>
<td>{if isset($view_list[$gid]) && check_perms('G007',$view_list[$gid])===true}<a href="{$self_url}?action=users&do=roles&u_id={$user['u_id']}&gid={$gid}&forward={$forward}">修改角色</a> |  {/if}{if isset($view_list[$gid]) && check_perms('G006',$view_list[$gid])===true}<a href="javascript:my_request('{$self_url}?action=users&do=del&uid={$user['u_id']}&gid={$gid}','确认要删除吗？')">删除</a>{/if}</td>
</tr>
{/loop}
</table>
<div class="button_box">
{if isset($view_list[$gid]) && check_perms('G005',$view_list[$gid])===true}
用户名：<input type="text" name="ck_username" id="ck_username">&nbsp;<input class="button_style" onclick="r_request('{$self_url}?action=users&do=check&gid={$gid}&word='+document.getElementById('ck_username').value)" type="button" value="检测">
&nbsp;
<select name="add_user" id="add_user">
<option value="0">请选择管理员</option>
{loop $user_list $user}
<option value="{$user['userid']}">{$user['username']}/{if !empty($user['truename'])} {$user['truename']} {else} '未填写'{/if}</option>
{/loop}
</select>
<input type="hidden" name="forward" value="{make_forward($back_url)}">
<input type="hidden" name="gid" value="{$gid}">
&nbsp;<input type="button" class="button_style" onclick="change_opt('form1','admin/group.php?action=users&do=add')" value="添加组管理员">&nbsp;{/if}
{if isset($view_list[$gid]) && check_perms('G006',$view_list[$gid])===true}<input class="button_style" onclick="if(confirm('是否将选中的管理员从本组中移除?')){change_opt('form1','{$self_url}?action=users&do=delall');}" type="button" value="批量删除">&nbsp;{/if}
<input type="button" class="button_style" onclick="self.location='{urldecode($back_url)}'" value="返回">
</div>
</form>
<div id="pages">
{$pages}
</div>
{template 'admin','footer'}